﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="EManage.aspx.cs" Inherits="EManage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
    <link href="Styles/EManage.css" rel="Stylesheet" type="text/css" />
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
    
    <asp:TreeView ID="TreeView1" runat="server" ImageSet="XPFileExplorer" 
        NodeIndent="15" onselectednodechanged="TreeView1_SelectedNodeChanged">
        <HoverNodeStyle Font-Underline="True" ForeColor="#6666AA" />
        <NodeStyle Font-Names="Tahoma" Font-Size="8pt" ForeColor="Black" 
            HorizontalPadding="2px" NodeSpacing="0px" VerticalPadding="2px" />
        <ParentNodeStyle Font-Bold="False" />
        <SelectedNodeStyle BackColor="#B5B5B5" Font-Underline="False" 
            HorizontalPadding="0px" VerticalPadding="0px" />
    </asp:TreeView>    
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:Panel ID="FuncBtnList" runat="server" CssClass="funcBtnList">
        <ul>
            <li>
                <asp:Label ID="Label1" runat="server" Text="在职员工"></asp:Label>
            </li>
            <li>
                <asp:ImageButton ID="Ibtn_working" runat="server" 
                    ImageUrl="~/Images/worker.png" onclick="Ibtn_working_Click" />
            </li>
            <li>
                <asp:ImageButton ID="Ibtn_quit" runat="server" 
                    ImageUrl="~/Images/quit.png" onclick="Ibtn_quit_Click" />
            </li>
            <li>
                <asp:ImageButton ID="Ibtn_black" runat="server" 
                    ImageUrl="~/Images/blacklist.png" onclick="Ibtn_black_Click" />
            </li>
            <asp:HiddenField ID="HiddenField1" runat="server" Value="1" />
        </ul>
    </asp:Panel>
    <asp:Panel ID="PanelFunction" runat="server" CssClass="panel">
        <asp:Button ID="Button1" runat="server" Text="添加员工" CssClass="button" 
            onclick="Button1_Click" />
        <asp:Button ID="btn_Del" runat="server" Text="删除员工" CssClass="button" 
            onclick="btn_Del_Click" ViewStateMode="Enabled" OnClientClick = "return confirm('请确认是否删除？')"/>
        <asp:Button ID="btn_removeQuit" runat="server" Text="移到离职" CssClass="button"
            onclick="btn_removeQuit_Click" ViewStateMode="Enabled" OnClientClick = "return confirm('确认移动到离职？')" />
        <asp:Button ID="btn_removeBlack" runat="server" Text="移到黑名单" 
            CssClass="button" onclick="btn_removeBlack_Click" ViewStateMode="Enabled" OnClientClick = "return confirm('确认移动到黑名单')" />
    </asp:Panel>
    <asp:Panel ID="PanelList" runat="server" CssClass ="list">
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
               Height="18px" Width="731px" style="margin-left:10px" CellPadding="4" 
                  ForeColor="#333333" GridLines="Vertical" AllowPaging="True" PageSize="15" 
                 >
                <AlternatingRowStyle BackColor="White" />
             <Columns>
                    <asp:TemplateField HeaderText="选择">
                        <ItemTemplate>
                           <asp:CheckBox ID="SelectEmployee" runat="server"  />
                        </ItemTemplate> 
                    </asp:TemplateField>
                    <asp:BoundField DataField="Name" HeaderText="姓名" />
                    <asp:TemplateField HeaderText="性别">
                        <ItemTemplate>
                           <%# Eval("Sex").ToString() == "0"?"男":"女" %>
                        </ItemTemplate> 
                        </asp:TemplateField>
                    <asp:TemplateField HeaderText="部门">
                        <ItemTemplate>
                           <asp:Label ID="lb_department" runat="server" Text='<%# ShowPartmentName(Eval("Department").ToString()) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText ="职务">
                        <ItemTemplate>
                            <asp:Label ID="lb_position" runat="server" Text='<%# ShowPositionName(Eval("Position").ToString()) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>   
                    <asp:BoundField DataField="Wage" HeaderText="工资" />
                    <asp:BoundField DataField="TelePhone" HeaderText="电话" />
                     <asp:TemplateField HeaderText="详细信息" >
                        <ItemTemplate>
                            <a href='EDetaeil.aspx?ID=<%# Eval("ID") %>' >详细信息</a>
                        </ItemTemplate>
                    </asp:TemplateField >          
                    <asp:TemplateField HeaderText="修改" >
                        <ItemTemplate>
                            <asp:HyperLink ID="UserEdit" runat="server" NavigateUrl='<%# Eval("ID", "User_save.aspx?id={0}") %>'  >修改</asp:HyperLink>
                        </ItemTemplate>
                    </asp:TemplateField > 
                </Columns> 
                <EmptyDataTemplate>
                    <center>
                       没有记录
                    </center>
                </EmptyDataTemplate>
                <EditRowStyle BackColor="#2461BF" />
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <PagerSettings Visible="False" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <RowStyle BackColor="#EFF3FB" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <SortedAscendingCellStyle BackColor="#F5F7FB" />
                <SortedAscendingHeaderStyle BackColor="#6D95E1" />
                <SortedDescendingCellStyle BackColor="#E9EBEF" />
                <SortedDescendingHeaderStyle BackColor="#4870BE" />      
           </asp:GridView>
           <center>
              共<asp:Label ID="lb_Allpage" runat="server"></asp:Label>页
              当前<asp:Label ID="lb_pageIndex" runat="server"></asp:Label>页&nbsp;&nbsp;
              <asp:LinkButton ID="first" runat="server" OnClick="LinkButton1_Click">首页</asp:LinkButton>
              <asp:LinkButton ID="prev" runat="server" OnClick="LinkButton1_Click">上一页</asp:LinkButton>
              <asp:LinkButton ID="next" runat="server" OnClick="LinkButton1_Click">下一页</asp:LinkButton>
              <asp:LinkButton ID="last" runat="server" OnClick="LinkButton1_Click">尾页</asp:LinkButton>&nbsp;&nbsp;
        </center>  
    </asp:Panel>
    <asp:Panel ID="ShowBirNamePinel" runat="server" Visible="False">
        <center>
            <h1>即将过生日员工信息</h1>
            <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False">
                <Columns>
                    <asp:BoundField DataField="Name" HeaderText="姓名" />
                    <asp:TemplateField HeaderText="部门">
                        <ItemTemplate>
                           <asp:Label ID="lb_department2" runat="server" Text='<%# ShowPartmentName(Eval("Department").ToString()) %>'></asp:Label>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="IDCard" HeaderText="身份证号" />
                    <asp:BoundField DataField="TelePhone" HeaderText="手机号" />
                </Columns>
            </asp:GridView>
            <asp:Button ID="btn_Back" runat="server" Text="返回" onclick="btn_Back_Click" />
        </center>
        
    </asp:Panel>
    
</asp:Content>

